{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<div class="tabs clearfix">
    <a href="javascript:;" class="active tabs_a fl" data-origin="additem" data-index="1">基本信息</a>
	<a href="javascript:;" class="tabs_a fl" data-origin="additem" data-index="2">{$ITEM_NAME}属性</a>
    <a href="javascript:;" class="tabs_a fl" data-origin="additem" data-index="3">详细描述</a>
</div>
<!-- end tabs -->
<div class="tabs-content" data-origin="additem">
<form method="post" id="form_addItem" enctype="multipart/form-data">
<div class="tc hide" data-index="3">
    <div class="formitems inline">
        <label class="fi-name"><!-- <span class="colorRed">*</span> -->{$ITEM_NAME}详情：</label>
        <div class="form-controls">
            <textarea name="contents" id="contents" class="large">{$contents}</textarea>
            <span class="fi-help-text error"></span>
        </div>
    </div>
    <div class="formactions mgl180">
        <button class="btn btn-blue"><i class="gicon-ok white"></i>提交</button>
    </div>
</div>
<!-- end 详细描述 -->
			<table class='hide' class='display:none;' id='J_add_sku_rank_price'>
				{foreach from=$arr_agent_rank item=row}
				<tr>
                	<td class="tables-form-title">{$row.rank_name}</td>
                    <td>
                        <input type="hidden" name="new_sku_rank_id[]" value="{$row.agent_rank_id}">
                        <input type="text" class="mini" name="new_sku_rank_price[]" value="">元
                    </td>
                </tr>
                {/foreach}
            </table>
<div class="tc hide" data-index="2">
    <div id="J_item_prop">
        <p class="edit_item_tip">设置{$ITEM_NAME}属性前，请先选择{$ITEM_NAME}类型。</p>
    </div>

    <div class="formactions mgl180">
        <span class="btn btn-blue jump" data-value='3'>下一步</span>
    </div>
</div>

<!-- end 规格属性 -->
<div class="tc" data-index="1">
        <div class="formitems inline">
            <label class="fi-name">
                <span class="colorRed">*</span>{$ITEM_NAME}分类：</label>
            <div class="form-controls">
                <select name="category_id">
                    <option value="">--请选择--</option>
                    {foreach from=$arr_category item=row1}
                    <option value="{$row1.class_id}.0">{$row1.class_name}</option>
                    {foreach from=$row1.sort_info item=row2}
                    <option value="{$row1.class_id}.{$row2.sort_id}">{$row2.sort_name}</option>
                    <!--{foreach from=$row2.genre_info item=row3}
                    <option value="{$row1.class_id}.{$row2.class_sort_id}.{$row3.class_genre_id}">{$row3.genre_name}</option>
					{/foreach}-->
                    {/foreach}
                    {/foreach}
                </select>
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <div class="formitems inline">
            <label class="fi-name">
                商品类型：</label>
            <div class="form-controls">
                <select name="item_type_id">
                    <option value="0">--请选择--</option>
                    {foreach from=$arr_type item=row}
					<option value="{$row.item_type_id}">{$row.item_type_name}</option>
                    {/foreach}
                </select>
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <!--
        <div class="formitems inline">
            <label class="fi-name"><span class="colorRed">*</span>是否为礼品：</label>
            <div class="form-controls">
                <div class="radio-group">
                    <label><input type="radio" name="is_gift" value="1">礼品</label>
                    <label><input type="radio" name="is_gift" value="0" checked>商品</label>
                </div>
                <span class="fi-help-text error"></span>
            </div>
        </div>
        -->
        <input type="hidden" name="is_gift" value="0">

        <!--
        <div class="formitems inline">
            <label class="fi-name">
                品牌：</label>
            <div class="form-controls">
                <select name="brand_id">
                    <option value="0">--请选择--</option>
                    {foreach from=$brand_list item=row}
                    <option value="{$row.brand_id}">{$row.brand_name}</option>
                    {/foreach}
                </select>
                <span class="fi-help-text error"></span>
            </div>
        </div>
        -->

        <div class="formitems inline">
            <label class="fi-name">
                <span class="colorRed">*</span>{$ITEM_NAME}名称：</label>
            <div class="form-controls">
                <input type="text" placeholder="请输入{$ITEM_NAME}名称" class="xxlarge" name="item_name">
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <div class="formitems inline">
            <label class="fi-name">
                <span class="colorRed">*</span>{$ITEM_NAME}货号：</label>
            <div class="form-controls">
                <input type="text" placeholder="请输入{$ITEM_NAME}货号" class="small" name="item_sn" value="{$item_sn}">
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <div class="formitems inline">
            <label class="fi-name"><span class="colorRed">*</span>排序号：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="serial" id="serial">
                <span class="fi-help-text hide"></span>
            </div>
        </div>
        <!-- <div class="formitems inline">
            <label class="fi-name">
                成本价：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="cost_price">
                <span class="fi-text">元</span>
                <span class="fi-help-text error"></span>
            </div>
        </div> -->

        <div class="formitems inline">
            <label class="fi-name">
                市场价：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="market_price">
                <span class="fi-text">元</span>
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <div class="formitems inline">
            <label class="fi-name">
                <span class="colorRed">*</span>本店价：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="mall_price">
                <span class="fi-text">元</span>
                <span class="fi-help-text error"></span>
            </div>
        </div>
        <!--
        <div class="formitems inline">
            <label class="fi-name">
                市场价：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="market_price">
                <span class="fi-text">元</span>
                <span class="fi-help-text error"></span>
            </div>
        </div>


        <div class="formitems inline">
            <label class="fi-name">
                积分抵扣百分比：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="integral_exchange_rate">
                <span class="fi-text">%</span>
                <span class="fi-help-text error"></span>
            </div>
        </div>
        -->
        <div class="formitems inline">
            <label class="fi-name">
                积分抵扣：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="integral_exchange">
                <span class="fi-help-text error"></span>
            </div>
        </div>
        <div class="formitems inline">
            <label class="fi-name">
                <span class="colorRed">*</span>库存数量：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="stock">
                <span class="fi-help-text error"></span>
            </div>
        </div>
        <div class="formitems inline">
            <label class="fi-name">
                警戒库存：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="stock_alarm">
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <div class="formitems inline">
            <label class="fi-name">
                {$ITEM_NAME}重量：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="weight">
                <span class="fi-text">克</span>
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <!--
        <div class="formitems inline">
            <label class="fi-name">
                单位：</label>
            <div class="form-controls">
                <input type="text" placeholder="0" class="small" name="unit" value="{$item.unit}">
                <span class="fi-help-text error"></span>
            </div>
        </div>
        -->

		<div class="formitems inline">
			<label class="fi-name"><span class="colorRed">*</span>{$ITEM_NAME}销售状态：</label>
			<div class="form-controls">
				<div class="radio-group">
					<label><input type="radio" name="isuse" value="1" checked>出售中</label>
					<label><input type="radio" name="isuse" value="0">仓库中</label>
				</div>
				<span class="fi-help-text error"></span>
			</div>
		</div>
        <div class="formitems inline">
            <label class="fi-name">积分商品：</label>
            <div class="form-controls">
                <div class="radio-group">
                    <label><input type="radio" name="is_integral" value="0" checked onclick="all_integral(this.value)">否</label>
                    <label><input type="radio" name="is_integral" value="1" onclick="all_integral(this.value)">是</label>
                </div>
                <span class="fi-help-text error"></span>
            </div>
        </div>
        <div class="formitems inline">
            <label class="fi-name"><span class="colorRed">*</span>{$ITEM_NAME}是否推荐（显示在首页）：</label>
            <div class="form-controls">
                <div class="radio-group">
                    <label><input type="radio" name="is_recommend" value="0" checked>否</label>
                    <label><input type="radio" name="is_recommend" value="1">是</label>
                </div>
                <span class="fi-help-text error"></span>
            </div>
        </div>

        <div class="formitems inline">
            <label class="fi-name">{$ITEM_NAME}简介：</label>
            <div class="form-controls">
                <textarea name="item_desc" id="item_desc">{$item.item_desc}</textarea>
                <span class="fi-help-text">一般在200字以内, 微商城详情中显示的内容</span>
            </div>
        </div>

            {upload_image_widget($pic_data)}

        <div class="formactions mgl180">
            <input type="hidden" name="action" value="add">
            <span class="btn btn-blue jump" data-value='2'>下一步</span>
        </div>
</div>

<!-- end 基本信息 -->
</form>
</div>
{/block}
{block name="css"}
{literal}
<style>
    #jpops .fi-name{width:65px;}
    #jpops .form-controls{margin-left:75px;}
    #j-item-extend li{margin-bottom:10px;}
    .edit_item_tip{font-size: 18px;color: #a0a0a0;background-color: inherit;text-decoration: none;margin: 20px 180px;}
</style>
{/literal}
{/block}
{block name="js"}
<script>
var item_name = '{$ITEM_NAME}';
</script>
<script src="__KD__/kindeditor.js?version={$version}" > </script>
<script src="__KD__/lang/zh_CN.js?version={$version}" > </script>
<script src="__ACPJS__/AcpItem/add_item.js?version={$version}"></script>
<script src="__ACPJS__/AcpItem/add_item_validate.js?version={$version}"></script>
<script src="__ACPJS__/AcpItem/add_item_step1.js?version={$version}"></script>
<script src="__ACPJS__/AcpItem/add_item_step2.js?version={$version}"></script>
<script src="__ACPJS__/AcpItem/add_item_step3.js?version={$version}"></script>
<!--<script src="__ACPJS__/AcpItem/add_item_step4.js?version={$version}"></script>-->
<script src='/Public/Js/common/upload_image.js?version={$version}'></script>
<script>
    var flag = 1;
    upload_batch_image('pic');
</script>
{/block}
